package client;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;

public class ThreadWrite4Client extends Thread {
    private PrintWriter out ;
    private Scanner scannerKey;
    public ThreadWrite4Client( PrintWriter out ) {
        this.out = out;
        scannerKey = new Scanner(System.in);
    }

    @Override
    public void run() {
        System.out.println("请不断输入信息:");
        while (true){
            String textInput = scannerKey.nextLine();
            out.println(textInput);
            out.flush();
        }
    }
}
